package com.xyy.saas.payment.cores.enums;

/**
 * 移动端类型
 */
public enum MobileTerminalTypeEnum {
    ANDROID("Android"),
    iOS("iOS");

    private String type;

    MobileTerminalTypeEnum(String type){
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static boolean contains(String code) {
        if (code == null || code.trim().length() == 0) {
            return false;
        }

        for(MobileTerminalTypeEnum typeEnum : MobileTerminalTypeEnum.values()) {
            if(typeEnum.type.equals(code.trim())) {
                return true;
            }
        }

        return false;
    }
}
